package com.sky.controller.admin;


import com.sky.dto.OrdersDTO;
import com.sky.dto.OrdersRejectionDTO;
import com.sky.result.Result;
import com.sky.service.OrdersService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Slf4j
@RequestMapping

public class OrderController {
    @Autowired
    private OrdersService orderService;

    @PutMapping("/admin/order/rejection")
    @ApiOperation("拒单")
    public Result refuse(@RequestBody OrdersRejectionDTO ordersRejectionDTO){
        log.info("拒单:{}",ordersRejectionDTO);
        orderService.refuse(ordersRejectionDTO);
        return Result.success();
    }
}
